package com.gpb.common.springmvc;

import java.io.Writer;

import freemarker.core.Environment;
import freemarker.template.TemplateException;
import freemarker.template.TemplateExceptionHandler;

public class FTLExceptionHandler extends Exception implements TemplateExceptionHandler {

	public void handleTemplateException(TemplateException arg0,
			Environment arg1, Writer arg2) throws TemplateException {
		//arg0.printStackTrace();

		
//		try {
//			arg2.append("eeee");
//			arg2.flush();
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//			throw new FreemarkerException("freemarker exception",arg0,arg1);
//		}
		throw new FTLException("freemarker exception",arg0,arg1);
		
	}

}
